package com.example.lvsuo.controller.cxg;


import com.example.lvsuo.entity.cxg.vo.AdmSigninrecorVo;
import com.example.lvsuo.modal.Result;
import com.example.lvsuo.service.cxg.IAdmSigninrecorService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 行政/签到管理 前端控制器
 * </p>
 *
 * @author 心心念念
 * @since 2021-03-30
 */
@RestController
@RequestMapping("/admSigninrecor")
public class AdmSigninrecorController {

    @Autowired
    IAdmSigninrecorService iAdmSigninrecorService;

    /**
     * 查询 高差
     * @param admSigninrecorVo
     * @return
     */
    @GetMapping
    public Result queryAdmSigninrecor(AdmSigninrecorVo admSigninrecorVo){

        PageHelper.startPage(admSigninrecorVo.getPageCur(),admSigninrecorVo.getPageSize());
        PageInfo pageInfo = new PageInfo(iAdmSigninrecorService.queryAdmSigninrecor(admSigninrecorVo));

//      List<AdmSigninrecorVo> admSigninrecorVos = iAdmSigninrecorService.queryAdmSigninrecor(admSigninrecorVo);
        return Result.back("ok","20000",pageInfo);
    }

    @GetMapping(params={"typeT=tj"})
    public Result queryAdmSigninrecorTJ(AdmSigninrecorVo admSigninrecorVo){
        PageHelper.startPage(admSigninrecorVo.getPageCur(),admSigninrecorVo.getPageSize());
        PageInfo pageInfo = new PageInfo(iAdmSigninrecorService.queryAdmSigninrecorTJ(admSigninrecorVo));
        return Result.back("ok","20000",pageInfo);
    }

}

